<?php
/**
 * Contem a página de revistas
 * 
 * @author Alberto Medeiros <albertomedeiros214@gmail.com>
 */

$arrObjRevista =  $view->result;
?>

<div class="comunication magazine">
    <div class="container">
        <div class="row">
            <div class="col-md-7 col-md-offset-5">
                <header>
                    <h1>Revistas</h1>
<!--                    <form class='nav-search' method='post'>
                        <div class='input-group'>
                            <input type='text' class='form-control' placeholder='Busque por palavra-chave...'>
                            <span class='input-group-btn'>
                                <button type='submit' class='btn btn-primary'>
                                    <div class='glyphicon glyphicon-search'></div>
                                </button>
                            </span>
                        </div>
                    </form>-->
                </header>
            </div>
            <?php
                
                foreach($arrObjRevista as $intChave=>$objResulta):
                    $strUri = $objResulta->field_field_image[0]["rendered"]["#item"]["uri"];
                
                
                    $strUriImagem       = $objResulta->field_field_image[0]['rendered']['#item']['uri'];
                    $strImagem          = image_style_url('revistas', $strUriImagem);
                    $objNode = $objResulta->_field_data["nid"]["entity"];
                    $strUrl = $objNode->field_link[key($objNode->field_link)][0]["value"];
            ?>
                
                    <div class="col-md-3">
                        <div class="post-media">
                            <a href="<?= $strUrl ?>">
                                <div class="post-media-tt"><?= $objResulta->field_field_revista[0]["raw"]["value"] ?> <em>| <?= $objResulta->node_title ?></em></div>
                                <span class='magazine-hover'>+</span>
                                <div class="post-media-info">
                                    <img src="<?= $strImagem ?>" width="" alt="">
                                </div>
                            </a>
                        </div>
                    </div>
            
            <?php
                endforeach;
            ?>

            <div class="col-md-12">
                <?php if ($pager): ?>
                    <?php print $pager; ?>
                <?php endif; ?>
            </div>
        </div>
    </div>
</div>